{extend name="layout" /}
{block name="css"}
<style type="text/css">
	td{
		font-size: 13px;
	}
</style>
{/block}
{block name="content"}
<div class="content">
			<!-- begin breadcrumb -->
			<ol class="breadcrumb pull-right">
				<li><a href="{:url('Admin/Index/index')}">首页</a></li>
				<li><a href="javascript:;">用户管理</a></li>
				<li><a href="javascript:;">用户信息</a></li>
				<li class="active">{$userinfo['username']}</li>
			</ol>
			<!-- end breadcrumb -->
			<!-- begin page-header -->
			<h1 class="page-header">用户信息<small></small></h1>
			<!-- end page-header -->
	<div class="col-md-12">
					<div class="panel panel-inverse" data-sortable-id="index-1">
						<div class="panel-heading">
							<div class="panel-heading-btn">
								<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
								<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-repeat"></i></a>
								<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
								<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger" data-click="panel-remove"><i class="fa fa-times"></i></a>
							</div>
							<h4 class="panel-title">当前用户信息：{$userinfo['username']}</h4>
						</div>
						<div class="panel-body">
							<!-- <div id="interactive-chart" class="height-sm"></div> -->
							<table class="table table-hover table-striped"> 
					    <tbody >
					    {notempty name="userinfo"}
					     <tr>
					    <td style="padding: 12px;">用户编号</td>
					    <td style="padding: 12px;"><span>{$userinfo.id}</span><input type="hidden" name="id" value="{$userinfo.id}"></td>
					    </tr>
					    <tr>
					    <td style="padding: 12px;">用户名</td>
					    <td style="padding: 12px;">{$userinfo.username}</td>
					    </tr>
					    <tr>
					    <td style="padding: 12px;">邮箱</td>
					    <td style="padding: 12px;">{$userinfo.email}</td>
					    </tr>
					    <tr>
					    <td style="padding: 12px;">登录IP</td>
					    <td style="padding: 12px;">{$userinfo.loginip}</td>
					    </tr>
					      <tr>
					    <td style="padding: 12px;">状态</td>
					    {if condition="$userinfo.status = '1'"}
					    <td style="padding: 12px;"><label class="label label-success">正常</label></td>
					    {else/}
					    <td style="padding: 12px;"><label class="label label-danger">禁用</label></td>
					    {/if}
					    </tr>
					    <td style="padding: 12px;">最后登录时间</td>
					    <td style="padding: 12px;">{$userinfo.update_at}</td>
					    </tr>
					    <tr>
					    <td style="padding: 12px;">用户类型</td>
					    {if condition="$userinfo['user_type'] == '1'"}
						<td style="padding: 12px;"><label class="label label-danger">超级管理员</label></td>
						{elseif condition="$userinfo['user_type'] == '2'"}
						<td style="padding: 12px;">车间负责</td>
						{elseif condition="$userinfo['user_type'] == '3'"}
						<td style="padding: 12px;">工段负责</td>
						{else /}
						<td style="padding: 12px;">电气室负责</td>
						{/if}
						</tr>
						<tr>
					    <td style="padding: 12px;">用户角色</td>
					    <td style="padding: 12px;color: red;">{if condition="$roles!=''"}
					    			{foreach $roles as $roles_item}
					    			<span> 
					    			{if condition="in_array($roles_item['roles_id'],$rolesid)"}
					    			<input type="hidden" name="roles_id[]" value="{$roles_item['roles_id']}" >
					    			{$roles_item['roles_name']}/
					    			{/if}
					    			</span>
					    			{/foreach}
					    		{/if}
					    </td>					     
					    </tr>
					    {/notempty}
					    </tbody>
						    </table>
						    <hr/>
						<a href="{:url('Admin/Users/upuser',['id' => $userinfo['id']])}"><button type="button" class="btn btn-primary" >修改基本信息</button></a>
					    <a href="{:url('Admin/Users/showuser')}"><button type="button" class="btn btn-primary pull-right">返回上一级</button></a>
						</div>
					</div>
	</div>
</div>
{/block}
